package com.demo.service;

import com.demo.common.model.Flighttickets;
import com.demo.common.model.Flighttime;
import com.demo.dao.FlightTimeDao;
import com.demo.dao.FlightticketsDao;
import com.jfinal.aop.Inject;
import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Page;

import java.util.List;

public class FlightticketsService {

    @Inject
    FlightticketsDao dao;

    public Page<Flighttickets> paginate(int pageNumber, int pageSize) {
        return dao.paginate(pageNumber, pageSize);
    }

    public Page<Flighttickets> paginate(int pageNumber, int pageSize, Kv cond) {
        return dao.paginate(pageNumber, pageSize, cond);
    }

    public Flighttickets findById(int id) {
        return dao.findById(id);
    }


    public void deleteById(int id) {
        dao.deleteById(id);
    }

    public Flighttickets findByFlightticketsno(String id,String flightticketsno){
        return dao.findByFlightticketsno(id,flightticketsno);
    }

    public List<Flighttickets> findAll(){
        return dao.findAll();
    }

    public Flighttickets findTicketNums(Integer id){
        return dao.findTicketNums(id);
    }
}
